//
//  ForumEntity.m
//  QQplayground
//
//  Created by zhangxy on 2018/7/20.
//  Copyright © 2018年 zhang. All rights reserved.
//

#import "ForumEntity.h"

@implementation ForumEntity

- (instancetype)initWithDictionary:(NSDictionary *)dictionary
{
    self = [super init];
    if (self) {
        self = [ForumEntity yy_modelWithDictionary:dictionary];
        
        _user_info = [[User alloc] initWithDictionary:dictionary[@"user_info"]];
        
        _images = [[NSMutableArray alloc] init];
        NSArray *imgs = dictionary[@"image"];
        for (NSDictionary *item in imgs) {
            [_images addObject:[[ImageEntity alloc] initWithDictionary:item]];
        }
    }
    return self;
}


+ (NSDictionary<NSString *,id> *)modelCustomPropertyMapper
{
    return @{
             @"thread_id" : @"thread_id",
             @"title":@"title",
             @"cat_id" : @"cat_id",
             @"count_post":@"count_post",
             @"count_like" : @"count_like",
             @"count_fav" : @"count_fav",
             @"is_like" : @"is_like",
             @"last_user_time" : @"last_user_time",
             @"message" : @"message",
             @"share_url":@"share_url"
             };
}

@end
